package com.qcby.service.impl;

import com.qcby.common.LessonPlan.ShowByPage;
import com.qcby.dao.TestDao;
import com.qcby.entity.LessonPlan;
import com.qcby.entity.Result;
import com.qcby.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TestServiceImpl implements TestService {

    @Autowired
    private TestDao testDao;

    @Override
    public Result<List<LessonPlan>> showInfoByPage(ShowByPage info) {
        info.setOffset(info.getPageSize()*(info.getPage()-1));
        System.out.println(testDao.showInfoByPage(info));
        return Result.success(testDao.showInfoByPage(info));
    }
}
